//
//  MLRefreshControlView.h
//  TycoonSale
//
//  Created by molon on 15/8/18.
//  Copyright (c) 2015年 molon. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MLRefreshControlConstants.h"

@class MLRefreshControlAnimateView;
@interface MLRefreshControlView : UIView

/**
 *  当前刷新状态
 */
@property (nonatomic,assign,readonly) MLRefreshControlState state;

/**
 *  scrollView的原top inset，还原的时候需要用到
 */
@property (nonatomic, assign) CGFloat originalTopInset;

/**
 *  是否在结束刷新的时候自动滚动到头部
 */
@property (nonatomic, assign,readonly) BOOL scrollToTopAfterEndRefreshing;

/**
 *  动画view
 */
@property (nonatomic, strong) MLRefreshControlAnimateView *animateView;

/**
 *  刷新控件的样式
 */
@property (nonatomic, assign) MLRefreshControlViewStyle style;

/**
 *  需要临时禁用动画的时候使用
 */
@property (nonatomic, assign) BOOL disableAnimation;

- (id)initWithScrollView:(UIScrollView *)scrollView andAction:(MLRefreshControlActionBlock)actionBlock andAnimateView:(MLRefreshControlAnimateView*)animateView andOriginalTopInset:(CGFloat)originalTopInset scrollToTopAfterEndRefreshing:(BOOL)scrollToTopAfterEndRefreshing;


- (void)endRefreshing;
- (void)beginRefreshing;

@end
